package gameMechanics;


import java.util.EnumMap;

public class CardSymbols {
	
	private static EnumMap<Suit, EnumMap<Rank, String>> symbols;
	
	public CardSymbols(){
		
		symbols = new EnumMap<Suit, EnumMap<Rank, String>>(Suit.class);
		
		for(Suit s : Suit.values()){
			symbols.put(s, new EnumMap<Rank, String>(Rank.class));
		}
		symbols.get(Suit.HEARTS).put(Rank.DEUCE, "h2");
		symbols.get(Suit.HEARTS).put(Rank.THREE, "h3");
		symbols.get(Suit.HEARTS).put(Rank.FOUR, "h4");
		symbols.get(Suit.HEARTS).put(Rank.FIVE, "h5");
		symbols.get(Suit.HEARTS).put(Rank.SIX, "h6");
		symbols.get(Suit.HEARTS).put(Rank.SEVEN, "h7");
		symbols.get(Suit.HEARTS).put(Rank.EIGHT, "h8");
		symbols.get(Suit.HEARTS).put(Rank.NINE, "h9");
		symbols.get(Suit.HEARTS).put(Rank.TEN, "h10");
		symbols.get(Suit.HEARTS).put(Rank.JACK, "hJ");
		symbols.get(Suit.HEARTS).put(Rank.QUEEN, "hQ");
		symbols.get(Suit.HEARTS).put(Rank.KING,  "hK");
		symbols.get(Suit.HEARTS).put(Rank.ACE, "hA");
		symbols.get(Suit.CLUBS).put(Rank.DEUCE, "c2");
		symbols.get(Suit.CLUBS).put(Rank.THREE, "c3");
		symbols.get(Suit.CLUBS).put(Rank.FOUR, "c4");
		symbols.get(Suit.CLUBS).put(Rank.FIVE, "c5");
		symbols.get(Suit.CLUBS).put(Rank.SIX, "c6");
		symbols.get(Suit.CLUBS).put(Rank.SEVEN, "c7");
		symbols.get(Suit.CLUBS).put(Rank.EIGHT, "c8");
		symbols.get(Suit.CLUBS).put(Rank.NINE, "c9");
		symbols.get(Suit.CLUBS).put(Rank.TEN, "c10");
		symbols.get(Suit.CLUBS).put(Rank.JACK, "c11");
		symbols.get(Suit.CLUBS).put(Rank.QUEEN, "c12");
		symbols.get(Suit.CLUBS).put(Rank.KING, "c13");
		symbols.get(Suit.CLUBS).put(Rank.ACE, "cA");
		symbols.get(Suit.DIAMONDS).put(Rank.DEUCE, "d2");
		symbols.get(Suit.DIAMONDS).put(Rank.THREE, "d3");
		symbols.get(Suit.DIAMONDS).put(Rank.FOUR, "d4");
		symbols.get(Suit.DIAMONDS).put(Rank.FIVE, "d5");
		symbols.get(Suit.DIAMONDS).put(Rank.SIX, "d6");
		symbols.get(Suit.DIAMONDS).put(Rank.SEVEN, "d7");
		symbols.get(Suit.DIAMONDS).put(Rank.EIGHT, "d8");
		symbols.get(Suit.DIAMONDS).put(Rank.NINE, "d9");
		symbols.get(Suit.DIAMONDS).put(Rank.TEN, "d10");
		symbols.get(Suit.DIAMONDS).put(Rank.JACK, "dJ");
		symbols.get(Suit.DIAMONDS).put(Rank.QUEEN, "dQ");
		symbols.get(Suit.DIAMONDS).put(Rank.KING, "dK");
		symbols.get(Suit.DIAMONDS).put(Rank.ACE, "dA");
		symbols.get(Suit.SPADES).put(Rank.DEUCE, "s2");
		symbols.get(Suit.SPADES).put(Rank.THREE, "s3");
		symbols.get(Suit.SPADES).put(Rank.FOUR, "s4");
		symbols.get(Suit.SPADES).put(Rank.FIVE, "s5");
		symbols.get(Suit.SPADES).put(Rank.SIX, "s6");
		symbols.get(Suit.SPADES).put(Rank.SEVEN, "s7");
		symbols.get(Suit.SPADES).put(Rank.EIGHT, "s8");
		symbols.get(Suit.SPADES).put(Rank.NINE, "s9");
		symbols.get(Suit.SPADES).put(Rank.TEN, "s10");
		symbols.get(Suit.SPADES).put(Rank.JACK, "sJ");
		symbols.get(Suit.SPADES).put(Rank.QUEEN, "sQ");
		symbols.get(Suit.SPADES).put(Rank.KING, "sK");
		symbols.get(Suit.SPADES).put(Rank.ACE, "sA");
	}
	public String symbolFor(Suit s, Rank r){
		return symbols.get(s).get(r);
	}
}	
	
